<?php get_header(); ?>
<?php global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } } ?>

<?php if (have_posts()) : ?>

 	  	<div class="postContainer">
			<div class="postsArchive">
				<ul>
				<?php while (have_posts()) : the_post(); ?>
					<li>
						<a href="<?php the_permalink() ?>">
						<?php if($thumbScript == "No") { echo get_thumbnail_noTimThumb($post->ID,"170","125", "thumb"); } else { ?>
							<img src="<?php echo get_thumbnail($post->ID,"170","125"); ?>" alt="<?php the_title() ?>" />
						<?php } ?>
						</a>
						<p class="meta"><?php the_time('j \d\e F \d\e Y'); ?>&nbsp;&nbsp;|&nbsp;&nbsp;<?php comments_popup_link('Nenhum Coment&aacute;rio', '1 Coment&aacute;rio', '% Coment&aacute;rios', 'comments-link', 'Os coment&aacute;riosComments est&atilde;o desabilitados'); ?></p>
						<h3><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h3>
						<p><?php smallerexcerpt('30'); ?>&nbsp;<a href="<?php the_permalink() ?>">Leia mais</a></p>
					</li>
				<?php endwhile; ?> 
				<?php
				// include('wp-pagenavi.php');
				// if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
				?>
				<div class="navigation">
					<div class="left"><?php next_posts_link('&laquo; Posts anteriores') ?></div>
					<div class="right"><?php previous_posts_link('Próximos posts &raquo;') ?></div>
				</div>
				<style type="text/css">
					.navigation { display:inline; float:left; position:relative; width:300px;  }
					.navigation .left { float:left; }
					.navigation .right { float:right; }
				</style>
				</ul>
			</div>
		</div>			

				
	<?php else : ?>
	
		
		<h2>N&atilde; Encontrado</h2>
		<p>Desculpe, mas nenhum post foi encontrado.</p>
		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
		
				
	<?php endif; ?>
	
<?php if($useGeneralSidebar == "No") { get_sidebar('blog'); } else { get_sidebar(); } ?>
<?php get_footer(); ?>